import java.awt.*;
import java.awt.image.*;
import java.io.*;
import javax.imageio.*;
import javax.swing.*;


public class GUIComponent extends JPanel {
	
	private BufferedImage image;
	private String url;
	
	public final static String MAP = "img/map.png";
	public final static String WOOD = "img/Icons/Holzbuendel.png";
	public final static String MENUBAR = "img/menubar.png";
	public final static String CHATBAR = "img/chatbar.png";
	public final static String TIMEWRAP = "img/timeWrap.png";
	
	public GUIComponent(String url) {
		this.url = url;
	}
	
	@Override
	public void paintComponent(Graphics g) {
		try {
			
	       image = ImageIO.read(new File(url));
	       
	       g.drawImage(image, 0, 0, null);
	       
	    } catch (IOException ex) {
	         // handle exception...
	    }
    }
	
}
